home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
assemblr
/
library
/
screen
/
uniform
/
ufas015.asm
< prev
next >
Wrap
Assembly Source File
|
1993-07-28
|
3KB
|
100 lines
; MASM/ MS Quick ASM/ Turbo ASM
; example for dynamic attribute modification
;
;attribut file <testfmt.att>
;---------------------------
;Format-Textattribut: 8
;Format-Rahmenattribut: 10
;fld0 DB 12 DUP(020h)
; Distanzen in Bereich <Daten>: Feldattribut: 500 Feldtyp: 502
;fld1 DD 0
; Distanzen in Bereich <Daten>: Feldattribut: 507 Feldtyp: 509
;fld2 DB 40 DUP(020h)
; Distanzen in Bereich <Daten>: Feldattribut: 514 Feldtyp: 516
UFCALLK MACRO OKZ, OFN, OFL, ORETC, OSM, ODAT
lea bx,OKZ ;; Offset Kennzeichen
push bx
lea bx,OFN ;; Offset Formatname
push bx
lea bx,OFL ;; Offset 1. Feld
push bx
lea bx,ORETC ;; Offset Returncode
push bx
lea bx,OSM ;; Offset Schreibmarke
push bx
lea bx,ODAT ;; Offset Daten
push bx
call UNIF ;; Unterprogrammaufruf
add sp,12 ;; Stack aktualisieren
ENDM
STRETCPY MACRO ZADR, SADR, LEN
cld ;; increment
lea di,ZADR ;; target adress
lea si,SADR ;; source adress
mov cx,LEN ;; length
rep movsb
ENDM
DOSSEG
TITLE example
EXTRN UNIF:NEAR
EXTRN MOUSEON:NEAR
EXTRN MOUSEOFF:NEAR
.MODEL SMALL
.Code
jmp anfang
INCLUDE ufas01.mac
INCLUDE testfmt.mac
const1 DB " output with generated attributes ! "
const2 DB " new colour of fld0 and fld1 ! "
const3 DB " new access of fld0 and fld1 ! "
const4 DB " new colour of text and frame ! "
format1 DB "testfmt "
anfang: push cs ; DS ist CS
pop ds
push cs ; ES ist CS
pop es
call MOUSEON
; normal output
af1:
STRETCPY fld2,const1,40
mov word ptr FKZ,2
mov word ptr SM,0
mov word ptr RETC,55
UFCALLK FKZ, format1, fld0, RETC, SM, Atestfmt
; change colour of field fld0 and fld1
STRETCPY fld2,const2,40
mov byte ptr [Atestfmt+500],15
mov byte ptr [Atestfmt+507],7
mov word ptr FKZ,3
mov word ptr RETC,55
UFCALLK FKZ, format1, fld0, RETC, SM, Atestfmt
; change access of field fld0 and fld1
STRETCPY fld2,const3,40
mov byte ptr [Atestfmt+502],97
mov byte ptr [Atestfmt+509],97
mov word ptr FKZ,3
mov word ptr RETC,55
UFCALLK FKZ, format1, fld0, RETC, SM, Atestfmt
; change colour of text and frame
STRETCPY fld2,const4,40
mov byte ptr [Atestfmt+8],112
mov byte ptr [Atestfmt+10],44
mov word ptr FKZ,2
mov word ptr RETC,55
UFCALLK FKZ, format1, fld0, RETC, SM, Atestfmt
ende: call MOUSEOFF
mov ah,4ch ; program end
mov al,0 ; Errorlevel 0
int 21h
END